home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 43 / Mac Magazin and MacEasy Magazine CD - Issue 43.iso / Software / Entwickler / CCMArea / Source / CCMArea.h < prev    next >
Encoding:
Text File  |  1997-12-20  |  1.3 KB  |  55 lines  |  [TEXT/CWIE]

  1. // CCMArea version 1.3
  2. // 11-11-97
  3. // by David Catmull
  4.  
  5. #pragma once
  6.  
  7. #include <ContextualMenu.h>
  8. #include "UCMArea.h"
  9.  
  10. enum {
  11.     cm_Nothing,                    // Not a CM click, or CM Manager not present
  12.     cm_MenuDisplayed,        // CM was displayed, but no app commands were chosen
  13.     cm_ItemChosen                // App command was chosen
  14. };
  15.  
  16. class CCMArea {
  17.     
  18. public:
  19.     
  20.     static Boolean sCMInited;
  21.     
  22.     CCMArea(CCMArea *inSuperCMArea = 0L);
  23.     
  24.     virtual void SetSuperCMArea(CCMArea *inSuperCMArea)
  25.         { mSuperCMArea = inSuperCMArea; }
  26.     
  27.     virtual short CMClick(const SMouseDownEvent &inMouseDown);
  28.     
  29.     virtual void GetSelectionDesc(AEDesc &outSelDesc);
  30.     
  31.     virtual void PreClick(const SMouseDownEvent &inMouseDown);
  32.     virtual void PostClick(const SMouseDownEvent &inMouseDown,short inCMResult,CommandT inCommand);
  33.     
  34.     virtual void BuildMenu(MenuHandle inMenu);
  35.     virtual void BuildMenuSelf(MenuHandle inMenu);
  36.     virtual void CleanUpMenus() {}
  37.     virtual Boolean AddSuperCommands()
  38.         { return true; }
  39.     
  40.     virtual Boolean DelayClick(const SMouseDownEvent &inMouseDown);
  41.     virtual UInt32 HelpType()
  42.         { return kCMHelpItemNoHelp; }
  43.     virtual void GetHelpItemString(Str255 &outString)
  44.         { outString[0] = 0; }
  45.     
  46.     virtual void ShowHelp();
  47.     
  48.     static void    SetMenuID(ResIDT inMenuID)
  49.         { sMenuID = inMenuID; }
  50.     
  51. protected:
  52.     CCMArea *mSuperCMArea;
  53.     static ResIDT sMenuID;
  54. };
  55.